import { ITodoData } from "./index";

export function todoView(todo: ITodoData): string {
    const { id, content, completed } = todo
    return `
        <input type="checkbox" data-id="${id}" ${completed ? 'checked' : ''}/>
        <span style="text-decoration:${completed ? 'line-through' : 'none'}">${content}</span>
        <button data-id="${id}">删除</button>
    `

}